import Vue from 'vue';
import Router from 'vue-router';

Vue.use(Router)

function loadView(view) {
  return () => import( `../pages${view}.vue`)
}


const router = new Router({
  mode: 'history',
  base:'web',
  routes: [
    {
        path:'/'  ,
        name:'index',
        component: loadView('/index/wrap'),
        children: [
            {
              path: '/',
              // component: login,
              component: loadView('/index/one'),
            },
            {
                path: '/two',
                // component: login,
                component: loadView('/index/two'),
            },
            {
                path: '/three',
                // component: login,
                component: loadView('/index/three'),
            },
        ]
    },
  ]
})
export default router;
